<!DOCTYPE html>
<html>
<head>
	<title>我的-照片忆书</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="yes" name="apple-touch-fullscreen">
	<meta content="telephone=no,email=no" name="format-detection">
	 <link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/normalize.css" type="text/css">
	 <link rel="stylesheet" type="text/css" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/photoBottom.css">
	 <link rel="stylesheet" type="text/css" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/havePhoto.css">
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/qrjs2.min.js"></script>
	 <script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jisuan.js"></script>
	<style type="text/css">
		.am-animation-fade {
			-webkit-animation-name: am-fade;
			animation-name: am-fade;
			-webkit-animation-duration: 0.8s;
			animation-duration: 0.8s;
			-webkit-animation-timing-function: linear;
			animation-timing-function: linear;
		}
		.am-g {
			margin: 0 auto;
			width: 100%;
		}
		/* 提示框 */
		.wst-msg-modal {
			display: none;
			position: fixed;
			bottom: 65px;
			z-index: 9999;
			text-align: center;
		}
		.wst-modal-content {
			display: inline-block;
			max-width: 90%;
			background-color: rgba(0, 0, 0, .7);
			color: white;
			border-radius: 10px;
			padding: 10px;
		}

	</style>
</head>
<body>
	<div class="container">
		<div class="phtotZhao none">
			<div class="back"></div>
			<div class="erwei">
				<div class="erwei_delete"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_add_members_q_r_code_close.png" class="img"></div>
				<div class="chengyuan">添加成员</div>

				<div class="erweima" id="qr1"></div>

				<div class="tianjia_text">
					添加相册成员一起传图<br>
					其他人扫码或截图发给朋友<br>
				</div>
			</div>

		</div>
		<div class="main no">
			<div class="guanLi">
				<div class="bookName">
					<span class="bookName_img"><img class="img" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_title_icon.png"></span>
					<span class="bookName_text">修改作品书名</span>
				</div>
				<div class="bookInput">
					<div class="book_input">
						<input type="text" name="" value="{$bookName}" class="baobao" placeholder="请输入作品照片书书名" onblur="changeBookName(this.value,{$photoBookId})">
					</div>
				</div>
				<div class="bookName" style="padding-top:0.266667rem">
					<span class="bookName_img"><img class="img" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_member_icon.png"></span>
					<span class="bookName_text">相册成员信息</span>
					<span class="bookName_text guanli">管理</span>
				</div>
				<div class="member">
					<div class="member_main">
						<volist name="people" id="vo" key="k">
							<div class="memberMain">
								<div class="member_xixin">
									<div class="member_img"><img src="{$vo.head_pic}" class="img radius"></div>
									<div class="member_zhao"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_pages_bg.png" class="img"></div>
									<div class="member_text">{$vo.imgNum}张</div>

								</div>
								<div class="member_name">{$vo.nickname}</div>
								<if condition="$k neq 1">
									<div class="delete_member none" onclick="deletePartner({$vo.userId},{$photoBookId},this)"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_delete_icon.png" class="img"></div>

								</if>
							</div>
						</volist>
					</div>
					<div class="add" onclick="inviteFriend({$photoBookId})">
						<div class="add_img"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_add_members_btn_nor.png" class="img"></div>
						<div class="add_text">点击邀请好友</div>
					</div>
				</div>
			</div>
			<div class="yulan" onclick="goIndex({$photoBookId})"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_me_settings_manage_members_preview_btn_nor.png" class="img"></div>
		</div>
		<div style="width: 100%;height: 50px"></div>
		<div class="footer">
			<ul class="footer_ul">
				<li class="footer_li left" onclick="goIndex({$photoBookId})">
					<div class="footer_img">
						<img class="img" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 40.png">
					</div>
					<span class="footer_text">点击编辑</span>
				</li>
				<li class="footer_li left" onclick="myBooks()">
					<div class="footer_img">
						<img  class="img" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Path.png">
					</div>
					<span class="footer_text footer_color">我的</span>
				</li>
				<li class="footer_li left" onclick="goHuodong({$photoBookId})">
					<div class="footer_img">
						<img  class="img" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/photo_book_huodong_icon_nor.png">
					</div>
					<span class="footer_text">活动</span>
				</li>
			</ul>
		</div>
	</div>
	<div class="am-g wst-msg-modal" id="wst-msg-modal">
		<div class="wst-modal-content" id="wst-modal-content"></div>
	</div>
	<div class="wst-to-top" id="toTop">
		<i class="am-icon-arrow-up wst-to-top-icon"></i>
	</div>
	<script>
		function myBooks(){
//		alert(1)
			location.href= WST.U('WebApp/PhotoBooks/myBooks');
		}
		function goIndex(id){
			location.href= WST.U('WebApp/PhotoBooks/index','photoBookId='+id);
		}
		function goHuodong(id){
			location.href= WST.U('WebApp/PhotoBooks/goHuodong', 'pbId='+id);
		}
		//改书名
		function changeBookName(val,bookId){
//			alert(val)
			var obj={}
			obj.bookName=val;
			obj.photoBookId=bookId;
			$.post(Think.U('WebApp/PhotoBooks/changeBookName'),obj, function(data){
//				alert(JSON.stringify(data))
				if(data.status==1){
					wstMsg('修改成功');
				}
			})
		}
		function inviteFriend(id){
//			alert(id)
			var container1 = document.getElementById('qr1');
			$('#qr1').empty();
			var svgElement = document.createElement("div"),

					u = "http://youyiku.sxnet.cc/WebApp/PhotoBooks/inviteFriend.html?photoBookId="+id,
					s = QRCode.generateSVG(u, {
						ecclevel: "M",
						fillcolor: "#FFFFFF",
						textcolor: "#373737",
//						margin: 4,
//						modulesize: 4
					});
			svgElement.appendChild(s);
			container1.appendChild(svgElement);
		}
	$(function(){
		//点击设置
		$('.shezhi').click(function(){
			$('.yes').addClass('none');
			$('.no').removeClass('none');
		})

		$('.erwei_delete').click(function(){
			$('.phtotZhao').addClass('none');
		})
		$('.frind').click(function(){
			$('.phtotZhao').removeClass('none');

		})
		//点击管理
		$('.guanli').toggle(function(){
			$('.guanli').text('完成')
			$('.delete_member').removeClass('none');
		},function(){
			$('.guanli').text('管理')
			$('.delete_member').addClass('none');
		})

		//点击删除成员
//		$('.delete_member').click(function(){
//			$(this).parent().addClass('none');
//		})
		//邀请好友
		$('.add_img').click(function(){
			$('.phtotZhao').removeClass('none');
		})

	})
		var WST = ThinkPHP = window.Think = {
			"ROOT"   : "__ROOT__",
			"APP"    : "__APP__",
			"PUBLIC" : "__PUBLIC__",
			"DEEP"   : "{:C('URL_PATHINFO_DEPR')}",
			"MODEL"  : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
			"VAR"    : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
			"DEFAULT_IMG": "{:WSTDomain()}/{$CONF['goodsImg']}",
		}
		//点击删除成员
	function deletePartner(userId,bookId,param){
//		alert(userId);
//		alert(bookId)
		var obj={}
		obj.userId=userId;
		obj.photoBookId=bookId;
		$.post(Think.U('WebApp/PhotoBooks/deletePartner'),obj, function(data){
			alert(JSON.stringify(data))
			if(data.status==1){
				$(param).parent().addClass('none');
			}
		})
	}
	//提示
	function wstMsg(msg, focusTarget, time){
		$('#wst-modal-content').html(msg);
		$('#wst-msg-modal').show();
		$('#wst-msg-modal').addClass('am-animation-fade');
		var t = time ? time : 2;
		setTimeout(function(){
			if(focusTarget){
				$('#'+focusTarget).focus();
			}
			$('#wst-msg-modal').fadeOut(1000);
		},t*1000);
	}
	</script>
	<script src="__PUBLIC__/js/think.js?v={$WST_V}"></script>

</body>
</html>